import request from '@/utils/request'

export function tologin(data) {
  return request({
    url: 'user/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: 'user/info',
    method: 'get'
  })
}
export function getUserDetail(data) {
  return request({
    url: 'user/detail',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: 'user/logout',
    method: 'post'
  })
}
export function getUserList(page,size) {
  return request({
    url: 'user/table/'+ page + '/' + size ,
    method: 'get'
  })
}

export function enableUser(data) {
  return request({
    url: 'user/enable',
    method: 'POST',
    data:data
  })
}
